Přeskočit na hlavní obsah

Module: components/formio/DynamicFormWithAuth

Type Aliases

ChangeEvent

Ƭ ChangeEvent: Object

Change event produced by the DynamicForm component.

Type declaration

NameType
changed?{ component: Component ; value: DataValue }
changed.componentComponent
changed.valueDataValue
data{ [key: string]: unknown; }

Defined in

src/web-app/src/components/formio/DynamicFormWithAuth.tsx:17

Functions

default

default(formProps): Element

A dynamic form that uses the user's formio token to authenticate.

Parameters

NameTypeDescription
formPropsOmit<FormProps, "form" | "onSubmit"> & { defaultValues?: Record<string, DataValue> ; loadingNode?: Element ; modifyFormBeforeRender?: (form: Form) => void ; onChange?: (e: ChangeEvent) => void ; onSubmit?: (submission: Submission, formPath: string) => void | Promise<void> ; onSubmitFail?: (error?: string) => void ; relativeFormPath: string }Most of the props are passed to the Form component from @react/formio but there are a few changes. The src prop and the form prop are removed. The new relativeFormPath prop will be used to manually fetch the form from the formio API and the result will be passed to the Form component using the form prop. The onSubmitDone prop is required, to force notification of the user and it is run after the form is successfully submitted. The onSubmitFail prop is required, to force notification of the user and it is run after the form is unsuccessfully submitted. By default the form is submitted to the formProps.absoluteSrc using a POST request. You can override this behavior by providing your own formProps.onSubmit function.

Returns

Element

See

DynamicForm

Defined in

src/web-app/src/components/formio/DynamicFormWithAuth.tsx:34